#ifndef _SUBJECT_H
#define	_SUBJECT_H

#include <list>
#include "Observer.h"

using std::list;

class Subject
{
private:
    int m_nVal;
    list<Observer*> m_observers;

public:
    void attach(Observer* observer);
    void detach(Observer* observer);
    void setValue(int val);
    void notify();
};

#endif	/* _SUBJECT_H */

